package com.battcn.controller;

import com.battcn.service.UserInfoService;
import com.battcn.vo.UserInfo;
import com.github.pagehelper.PageInfo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

@RestController
@Api(value = "用户专栏")
public class UserController {

    @Autowired
    UserInfoService userInfoService;

    @GetMapping(value = "/user/query", produces = "application/json;charset=UTF-8")
    @ApiOperation(value = "用户查询")
    public PageInfo<UserInfo> query(HttpServletRequest request) {
        return userInfoService.queryUserInfoForList();
    }
}
